package com.atguigu.tingshu.payment.api;

import com.alibaba.fastjson.JSONObject;
import com.atguigu.tingshu.model.account.UserAccountDetail;
import com.atguigu.tingshu.payment.service.WxPayService;
import com.github.wxpay.sdk.WXPayUtil;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

/***
 * 账户余额支付给外部调用接口
 */
@Tag(name = "账户支付接口")
@RestController
@RequestMapping("/api/payment/accountPay")
@Slf4j
public class AccountPayApiController {

    /**
     * 余额支付的异步通知的地址
     * @param userAccountDetail
     * @return
     */
    @SneakyThrows
    @PostMapping("/accountNotifyAddress")
    public String accountNotifyAddress(@RequestBody UserAccountDetail userAccountDetail){
        // 参照微信
        return "SUCCESS";
    }


}
